import java.util.ArrayList;
import java.util.List;

/**
 * Created by losor on 2017/3/5.
 */
public class _412_FizzBuzz {
    public static void main(String[] args) {

    }
    public List<String> fizzBuzz(int n) {
        List<String> out = new ArrayList<>(n);
        for (int i = 1; i <= n; i++) {
            out.add(printNum(i));
        }
        return out;
    }

    public static String printNum(int n){
        if (n%3 == 0 && n%5 == 0){
            return "FizzBuzz";
        }
        else if (n%3 == 0){
            return "Fizz";
        }
        else if (n%5 == 0){
            return "Buzz";
        }
        else{
            return Integer.toString(n);
        }
    }
}
